# import re
# # 将英文单词倒序
# name = 'what is your name'
# res = re.findall("\w+", name)
# print(res)
# res.reverse()
# str = " ".join(res)
# print(str)


# import paramiko
# ssh = paramiko.SSHClient()  # 生成ssh客户端连接对象
# ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())  # 允许连接不在know_hosts文件中的主机
# ssh.connect(hostname='10.0.0.51', port=22, username='root', password='1')  # 连接服务器，ip地址，端口，主机名，主机密码
# stdin,stdout,stdress = ssh.exec_command('ifconfig')  # 执行linux命令
# # stdin:输入的命令  stdout:输出的内容，stdress:
# result = stdout.read()
# print(result.decode('utf-8'))
# ssh.close()  # 关闭连接

# l = ['123', '456']
# l = ','.join(l)
# print(l, type(l))

import json
info = {'board': {'code': 100, 'data': {'manufacturer': 'Parallels Software International Inc.', 'model': 'Parallels Virtual Platform', 'sn': 'Parallels-1A 1B CB 3B 64 66 4B 13 86 B0 86 FF 7E 2B 20 30'}},
        'cpu': {'code': 100, 'data': {'cpu_count': 24, 'cpu_physical_count': 2, 'cpu_model': ' Intel(R) Xeon(R) CPU E5-2620 v2 @ 2.10GHz'}},
        'disk': {'code': 100, 'data': {' 0': {'slot': '0', 'pd_type': 'SAS', 'capacity': '279.396 GB [0x22ecb25c Sectors]', 'model': 'SEAGATE ST300MM0006     LS08S0K2B5NV'},
                                       ' 1': {'slot': '1', 'pd_type': 'SAS', 'capacity': '279.396 GB [0x22ecb25c Sectors]', 'model': 'SEAGATE ST300MM0006     LS08S0K2B5AH'},
                                       ' 2': {'slot': '2', 'pd_type': 'SATA', 'capacity': '476.939 GB [0x3b9e12b0 Sectors]', 'model': 'S1SZNSAFA01085L     Samsung SSD 850 PRO 512GB               EXM01B6Q'},
                                       ' 3': {'slot': '3', 'pd_type': 'SATA', 'capacity': '476.939 GB [0x3b9e12b0 Sectors]', 'model': 'S1AXNSAF912433K     Samsung SSD 840 PRO Series              DXM06B0Q'},
                                       ' 4': {'slot': '4', 'pd_type': 'SATA', 'capacity': '476.939 GB [0x3b9e12b0 Sectors]', 'model': 'S1AXNSAF303909M     Samsung SSD 840 PRO Series              DXM05B0Q'},
                                       ' 5': {'slot': '5', 'pd_type': 'SATA', 'capacity': '476.939 GB [0x3b9e12b0 Sectors]', 'model': 'S1AXNSAFB00549A     Samsung SSD 840 PRO Series              DXM06B0Q'}}},
        'memory': {'code': 100, 'data': {' DIMM #0': {'capacity': '1024 MB', 'slot': 'DIMM #0', 'model': 'DRAM', 'speed': '667 MHz', 'manufacturer': 'Not Specified', 'sn': 'Not Specified'},
                                         ' DIMM #1': {'capacity': 'No Module Installed', 'slot': 'DIMM #1', 'model': 'DRAM', 'speed': '667 MHz', 'manufacturer': 'Not Specified', 'sn': 'Not Specified'},
                                         ' DIMM #2': {'capacity': 'No Module Installed', 'slot': 'DIMM #2', 'model': 'DRAM', 'speed': '667 MHz', 'manufacturer': 'Not Specified', 'sn': 'Not Specified'},
                                         ' DIMM #3': {'capacity': 'No Module Installed', 'slot': 'DIMM #3', 'model': 'DRAM', 'speed': '667 MHz', 'manufacturer': 'Not Specified', 'sn': 'Not Specified'},
                                         ' DIMM #4': {'capacity': 'No Module Installed', 'slot': 'DIMM #4', 'model': 'DRAM', 'speed': '667 MHz', 'manufacturer': 'Not Specified', 'sn': 'Not Specified'},
                                         ' DIMM #5': {'capacity': 'No Module Installed', 'slot': 'DIMM #5', 'model': 'DRAM', 'speed': '667 MHz', 'manufacturer': 'Not Specified', 'sn': 'Not Specified'},
                                         ' DIMM #6': {'capacity': 'No Module Installed', 'slot': 'DIMM #6', 'model': 'DRAM', 'speed': '667 MHz', 'manufacturer': 'Not Specified', 'sn': 'Not Specified'},
                                         ' DIMM #7': {'capacity': 'No Module Installed', 'slot': 'DIMM #7', 'model': 'DRAM', 'speed': '667 MHz', 'manufacturer': 'Not Specified', 'sn': 'Not Specified'}}},
        'nic': {'code': 100, 'data': {'eth0': {'up': True, 'hwaddr': '00:1c:42:a5:57:7a', 'ipaddrs': '10.211.55.4', 'netmask': '255.255.255.0'}}}}


info = json.dumps(info)
print(info)

a = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
a = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
a = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
a = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
a = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"